package com.restaurant.order;
public class FoodOrderSystemTest {
    public static void main(String[] args) {
        try {
            StapleFood rice = new StapleFood("番茄炒蛋饭", "酸甜可口的番茄炒蛋盖饭", 18.0, 10, "清淡");
            Beverage cola = new Beverage("冰镇可乐", "330ml罐装可乐", 5.0, 5, true);
            Customer customer = new Customer("C001", "张三", "13812345678");
            Order order = new Order("O20251030001", customer);
            order.addDish(rice, 2);
            order.addDish(cola, 1);
            order.showOrder();
            System.out.println("\n尝试购买6罐可乐（库存仅4）：");
            order.addDish(cola, 5);

        } catch (Exception e) {
            System.out.println("点餐失败：" + e.getMessage());
        }
    }
}
